package com.jfinal.aceadmin.tools;

public class Column {

	private String name;
	private String type;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		if (type.equalsIgnoreCase("boolean")) {
			this.type = "boolean";
		} else if (type.equalsIgnoreCase("double") || type.equalsIgnoreCase("float")) {
			this.type = "double";
		} else if (type.equalsIgnoreCase("int") || type.equalsIgnoreCase("integer")
				|| type.equalsIgnoreCase("short")) {
			this.type = "int";
		} else if (type.equalsIgnoreCase("long")) {
			this.type = "long";
		} else if (type.equalsIgnoreCase("string")) {
			this.type = "String";
		} else if (type.equalsIgnoreCase("date")) {
			this.type = "Date";
		} else {
			this.type = "Object";
		}
	}

	@Override
	public String toString() {
		return "Column [name=" + name + ", type=" + type + "]";
	}

}
